 package com.education.platform.api.service;

 import com.education.platform.api.vo.request.ChallengeResultVO;
 import com.education.platform.api.vo.request.UserPointsUpdateVO;
 import com.education.platform.api.vo.response.PointsRankVO;
 import com.education.platform.common.service.BaseService;
 import com.education.platform.dao.entity.UserPointsDO;
 import com.education.platform.dao.model.PointsRankModel;

 import java.util.List;

 /**
* describe: 积分表
* @author : tomato
* @date: 2020-06-06 03:07:32.843
**/
public interface UserPointsService  extends BaseService<UserPointsDO> {

     /**
      * 挑战答题
      * 同时保存到redis
      * @param point
      * @param businessType
      */
     ChallengeResultVO challenge(Float point, Integer numbers , Integer businessType);
     /**
      * 增加积分
      * @param userPointsUpdateVO  vo
      */
     void addPoints( UserPointsUpdateVO userPointsUpdateVO);

     /**
      * 获取积分排序
      * @return
      */
    List<PointsRankModel> getRankList();
     /**
      * 获取用户积分排名
      * @param userId
      * @return
      */
     PointsRankModel getRankByUserId(Integer userId);
}
